export function timeDate() {
	//系统当前时间格式化
	// var currentformatDate = "";
	//获取系统当前日期
	var date = new Date();
	//获取当前年
	var currentYear = date.getFullYear();
	// 获取当前月
	var currentMonth = date.getMonth() + 1;
	currentMonth = currentMonth <= 9 ? '0' + currentMonth : currentMonth;
	//获取当前日
	var currentDay = date.getDate();
	currentDay = currentDay <= 9 ? '0' + currentDay : currentDay;
	// 时
	var currentHours = date.getHours();
	//分
	var currentMinutes = date.getMinutes();
	// 秒
	var currentseconds = date.getSeconds();
	// / HH:mm:ss
	// time.value = currentHours + ':' + currentMinutes + ':' + currentseconds;
	// dateData.value = currentYear + '年' + currentMonth + '月' + currentDay + '日';

	var day = date.getDay();
	var weeks = new Array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');
	// week.value = weeks[day];

	return {
		time: currentHours + ':' + currentMinutes + ':' + currentseconds,
		dateData: currentYear + '年' + currentMonth + '月' + currentDay + '日',
		week: weeks[day]
	}
};

// IP定位获取当前城市信息
export function getLngLatLocation() {

	var province = AMap.plugin('AMap.CitySearch', function () {
		// console.log('进入获取城市信息')
		var citySearch = new AMap.CitySearch();
		citySearch.getLocalCity(function (status, result) {
			if (status === 'complete' && result.info === 'OK') {
				// 查询成功，result即为当前所在城市信息
				// console.log('当前城市信息', result.province);
				return result.province

			}
		});
	});
	console.log(province)
	return province
};